<?php

namespace App\Http\Requests\Home;

use Illuminate\Foundation\Http\FormRequest;

class submitIntegralOrderRequest extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
        	'addressId' => 'required',
            'integral_goods_id' => 'required',
            'integral_price' => 'required'
        ];
    }

    public function messages()
    {
        return [
           'addressId.required' => '请选择地址',
           'integral_goods_id.required' => '未知错误',
           'integral_price.max' => '未知错误' 
        ];
    }
}
